package com.boast.workflow.db;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.Map;

import com.opensymphony.workflow.StoreException;
import com.opensymphony.workflow.spi.jdbc.JDBCWorkflowStore;
import com.zhangyj.db.BoastDataSource;
import com.zhangyj.db.DBUtil;

public class WFWorkflowStore extends JDBCWorkflowStore {

	@SuppressWarnings("rawtypes")
	@Override
	public void init(Map props) throws StoreException {
		super.init(props);
		ds = new BoastDataSource();
	}

	protected long getNextEntrySequence(Connection c) throws SQLException {
		return DBUtil.getIntId(c, "wfentry");
	}

	protected long getNextStepSequence(Connection c) throws SQLException {
		return DBUtil.getIntId(c, "wfstep");
	}
}
